
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/3
  Time: 8:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>管理员界面</title>
</head>
<body>
    <button><a href="adduser.jsp">新建用户</a></button>
    <button><a href="deluser.jsp">删除用户</a></button>
    <button><a href="updateuser.jsp">更新用户</a></button>
    <button><a href="index.jsp">返回首页</a></button>
    <br>
    <form method="post" action="selectAll">
        <input type="submit" value="查看所有用户"></input>
    </form>
    <div class="container">
    <c:if test="${not empty users}">
        <c:forEach var="user" items="${users}">
            id:${user.id}<br>
            姓名:${user.username}<br>
            性别:${user.sex}<br>
            爱好:
            <c:if test="${not empty user.likes[0]}">
                ${user.likes[0]}
            </c:if>
            <c:if test="${not empty user.likes[1]}">
                ,${user.likes[1]}
            </c:if>
            <c:if test="${not empty user.likes[2]}">
                ,${user.likes[2]}
            </c:if><br>
            班级:${user.group}<br>
            <hr>
        </c:forEach>
    </c:if>
    </div>
</body>
</html>
